This app represents a way for plotting life expectency at birth on an interactive map using leaflet package just by selecting the year of interest you can also choose your region or the range of interest
November 13, 2017
This app represents a way for plotting life expectency at birth on an interactive map using leaflet package just by selecting the year of interest you can also choose your region or the range of interest
leaflet(world_map) %>% addTiles() %>%
addPolygons(fillColor = ~pal(lifeExpec),weight = 2,
opacity = 1,color = "white",fillOpacity = 0.7,label = labels,
labelOptions = labelOptions(style = list("font-weight" = "normal"),
textsize = "15px",direction = "auto"))%>%setView( -25,20, 2)
The Data set is downloaded using the WDI package from World Data Bank then selected the required columns only (year, lifeExpec, country, iso3code, region)